package com.why.serviceedu.service.impl;

import com.why.servicebase.exception.GuilException;
import com.why.serviceedu.bean.EduCourseDescription;
import com.why.serviceedu.mapper.EduCourseDescriptionMapper;
import com.why.serviceedu.service.EduCourseDescriptionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author why
 * @since 2021-02-01
 */
@Service
public class EduCourseDescriptionServiceImpl extends ServiceImpl<EduCourseDescriptionMapper, EduCourseDescription> implements EduCourseDescriptionService {

    /**
     * 根据课程信息删除描述
     * @param courseId
     */
    @Override
    public void removeDescrpitionById(String courseId) {
        int byId = baseMapper.deleteById(courseId);
        if(byId<=0)
            throw new GuilException(20001,"描述删除失败!");
    }
}
